# -*- coding: utf-8 -*-
# @Time    : 2021/4/15 0015 17:01
# @Author  : 蒋才果
# @Email   : 1476235300@qq.com
# @File    : 冒泡排序.py
# @Software: PyCharm
# ls = [36,25, 48, 12, 25, 65, 43, 1]
# for j in range(len(ls)-1):
#     for i in range(len(ls)-1):
#         if ls[i] > ls[i+1]:
#             ls[i],ls[i+1] = ls[i+1],ls[i]
#             # print(i)
# print(ls)

# def pao_sort(ls):
#     if len(ls) <= 1:
#         return ls
#     else:
#         for j in range(len(ls) - 1):
#             for i in range(len(ls) - 1):
#                 if ls[i] > ls[i+1]:
#                     ls[i],ls[i+1] = ls[i+1],ls[i]
#         return ls
# if __name__ == '__main__':
#     ls = [36,25, 48, 12, 25, 65, 43, 1]
#     print(pao_sort(ls))






